When an image taken with a camera or produced with a personal computer as an input image is to be outputted from a printer as a hard copy image or displayed on a monitor as a soft copy image, for instance, the color space of the input image (input color space) is converted into the color space of the output device such as a printer or a monitor (output color space).
If the input color space and the output color space are different in dynamic range from each other, the grayscale is compressed or expanded to thereby map the image so that the dynamic range of the output device may effectively be used.
In the case where the output color space is smaller than the input color space, the grayscale needs to be subjected to conversion for compressing it in order to put the whole scene luminance information on the input image within a limited dynamic range for luminance of the output device.
Compression of the grayscale is normally performed using a one-dimensional lookup table (LUT) for converting a three-channel input image signal, with the three channels being red (R), green (G) and blue (B) channels, into a three-channel RGB output image signal.
FIG. 11 shows an exemplary grayscale curve used for an LUT for performing such compression of the grayscale.
The grayscale curve as shown is adapted for the compression of an RGB input image signal with a dynamic range of 5.3 into an RGB output image signal with a dynamic range of 3.3, and has a linear middle part with a slope of 45 degrees continuing at its both ends into parts with reduced slopes, respectively, that is to say, constitutes a so-called S curve.
The grayscale curve of S shape is used to maintain the grayscale at its middle levels while compressing it at lower and higher levels more intensively and, consequently, allows luminance information on an input image to be put within the dynamic range for luminance of an output image with no clamping thereof.
In another method for grayscale compression, an RGB signal is converted into a luminance signal and a chromaticity signal (in Yxy, YCC or L*a*b*, for instance), and the luminance signal Y or lightness signal L* is solely compressed using a grayscale curve (LUT).
Patent Literature 1 proposes yet another method for grayscale compression. In the gradation correcting method as disclosed in Patent Literature 1, a luminance signal is obtained from R, G, and B input signals; the luminance signal is gamma-converted according to desired gradation characteristics; the ratio of the gamma-converted luminance signal to the luminance signal before gamma conversion is multiplied by each of the R, G, and B input signals for obtaining primary gradation-corrected R, G, and B signals; the difference between each of the R, G, and B input signals and the luminance signal before gamma conversion is added to the gamma converted luminance signal for obtaining secondary gradation-corrected R, G, and B signals; and final, gradation-corrected R, G, and B output signals are obtained by interpolation from the primary and secondary gradation-corrected R, G, and B signals, with the ratio between the two types of gradation-corrected R, G, and B signals to be added being controlled depending on the value of the luminance signal before gamma conversion.
It is stated in Patent Literature 1 that the disclosed method is the gradation adjusting method which allows an effective brightness adjustment in the dynamic range of a CRT or a printer with no change in hue or saturation.